from django.conf.urls import url
from rest_framework.routers import DefaultRouter

from . import views

urlpatterns = [
    # 不能用category_id 用了之后 会卡系统
    # url(r'^categories/(?P<category_id>\d+)/skus$', views.SKUListView.as_view()),
    url(r'^categories/(?P<pk>\d+)/skus/$', views.SKUListView.as_view()),  # 商品列表

]
  # 商品搜索
router = DefaultRouter()
router.register('skus/search', views.SKUSearchViewSet, base_name='skus_search')

urlpatterns += router.urls
